import { Router } from "express";
import * as roleController from "../controllers/role.controller";
const router = Router();
router.post("/", roleController.getAllRoles);
router.get("/:id", roleController.getRoleById);
router.post("/add", roleController.createRole);
router.put("/:id", roleController.updateRole);
router.delete("/:id", roleController.deleteRole);
router.post("/:roleId/permissions", roleController.assignPermissionsToRole);
router.get("/:roleId/permissions", roleController.getRolePermissions);
export default router;
